import type { PublishArticleAPI, PublishArticleRes, UploadImageResAPI } from '@/types/publish'
import { request } from '@/utils/request'

//发布文章业务
export const publishArticle = (params: PublishArticleAPI) => {
  return request<PublishArticleRes>('/v1_0/mp/articles', 'POST', params)
}

// 上传图片业务
export const uploadImage = (data: object) => {
  return request<UploadImageResAPI>('/v1_0/upload', 'POST', data)
}
